{  Statement: http://codeforces.ru/problemset/problem/112/A
	Verdict: Accepted
}
uses
        SysUtils, Math;

var
    s, t : string;

begin  
    readln(s);
    readln(t);
    s := UpperCase(s);
    t := UpperCase(t);
    if s < t then write(-1) else
    if s = t then write(0) else write(1);
end.